package com.tsing.mapper.impl;

import com.tsing.common.framwork.mapper.CommonDao;
import com.tsing.mapper.AdUserMapper;
import com.tsing.pojo.entity.AdUser;

import java.sql.SQLException;

/**
 * @author 吴阳基
 * @datetime 2023/12/13 11:33
 */
public class AdUserMapperImpl extends CommonDao implements AdUserMapper {
    @Override
    public AdUser getUserByUsername(String username) {
        AdUser adUser = null;
        try {
            adUser =executeSingleQuery(AdUser.class,"select * from ad_user where name = ?" ,new Object[]{username});
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
        return adUser;
    }
}
